/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.documentar.view;

import br.com.documentar.controller.AcessoColaboradorController;
import br.com.documentar.model.AcessoColaboradorModel;
import br.com.documentar.util.UtilitariosCampos;

/**
 *
 * @author Santos
 */
public class PrincipalView extends javax.swing.JFrame {

    /**
     * Creates new form PrincipalView
     */
    public PrincipalView() {
        initComponents();
        setExtendedState(MAXIMIZED_BOTH);
        getAcessoUsuario();
    }

    /**
     * Metodo responspavel por fazer chamada do metodo que define os acessos dos
     * usuários
     */
    private void getAcessoUsuario() {
        AcessoColaboradorModel modelAcessoColaborador = new AcessoColaboradorModel();
        AcessoColaboradorController controlAcessoColaborador = new AcessoColaboradorController();

        modelAcessoColaborador.getColaborador().setCodigo(UtilitariosCampos.getUsuario());
        modelAcessoColaborador.setActionScript("porUsuario");
        //Interrompe a validação de acesso dos usuários ao efetuar o logon
        UtilitariosCampos.validarAcessoUsuario(menuBarTopo, controlAcessoColaborador.getAcessoUsuario(modelAcessoColaborador));
    }

    /**
     * Metodo responsável por fazer chamada do metodo de fechar todas as janelas
     * do programa
     */
    private void getTrocaUsuario() {
        UtilitariosCampos.fecharTodasJanelas();
        LoginView.main();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelCentral = new javax.swing.JPanel();
        menuBarTopo = new javax.swing.JMenuBar();
        jMenuArquivo = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItemSair = new javax.swing.JMenuItem();
        jMenuCadastros = new javax.swing.JMenu();
        jMenuItemProduto = new javax.swing.JMenuItem();
        jMenuItemVersao = new javax.swing.JMenuItem();
        jMenuItemCategoria = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItemAssociarCategoriaVersao = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItemTabela = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItemColuna = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItemCadastrarObjetos = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItemDocumento = new javax.swing.JMenuItem();
        jMenuItemAssociarDocTabCol = new javax.swing.JMenuItem();
        jMenuItemDocDoc = new javax.swing.JMenuItem();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuConsultas = new javax.swing.JMenu();
        jMenuItemDocumentos = new javax.swing.JMenuItem();
        jMenuItem12 = new javax.swing.JMenuItem();
        jMenuConfiguracao = new javax.swing.JMenu();
        jMenuItemBancoDados = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        jMenuItemSetor = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();
        jMenuItemColaborador = new javax.swing.JMenuItem();
        jMenuItemAcessoColaborador = new javax.swing.JMenuItem();
        jMenuItemJanela = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem9 = new javax.swing.JMenuItem();
        jMenuItem10 = new javax.swing.JMenuItem();
        jMenuItem11 = new javax.swing.JMenuItem();
        jMenuAjuda = new javax.swing.JMenu();
        jMenuItemAbout = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Painel de Controle");

        javax.swing.GroupLayout panelCentralLayout = new javax.swing.GroupLayout(panelCentral);
        panelCentral.setLayout(panelCentralLayout);
        panelCentralLayout.setHorizontalGroup(
            panelCentralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 555, Short.MAX_VALUE)
        );
        panelCentralLayout.setVerticalGroup(
            panelCentralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 354, Short.MAX_VALUE)
        );

        jMenuArquivo.setMnemonic('A');
        jMenuArquivo.setText("Arquivo");
        jMenuArquivo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuArquivoActionPerformed(evt);
            }
        });

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem1.setText("Trocar Usuário");
        jMenuItem1.setName("Trocar Usuario"); // NOI18N
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenuArquivo.add(jMenuItem1);

        jMenuItemSair.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemSair.setMnemonic('S');
        jMenuItemSair.setText("Sair");
        jMenuItemSair.setName("Sair"); // NOI18N
        jMenuItemSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemSairActionPerformed(evt);
            }
        });
        jMenuArquivo.add(jMenuItemSair);

        menuBarTopo.add(jMenuArquivo);

        jMenuCadastros.setMnemonic('C');
        jMenuCadastros.setText("Cadastros");
        jMenuCadastros.setName("Cadastrar Objeto"); // NOI18N
        jMenuCadastros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuCadastrosActionPerformed(evt);
            }
        });

        jMenuItemProduto.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemProduto.setMnemonic('P');
        jMenuItemProduto.setText("Produto");
        jMenuItemProduto.setName("Cadastrar Produto"); // NOI18N
        jMenuItemProduto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemProdutoActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemProduto);

        jMenuItemVersao.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemVersao.setMnemonic('V');
        jMenuItemVersao.setText("Versão");
        jMenuItemVersao.setName("Cadastrar Versao"); // NOI18N
        jMenuItemVersao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemVersaoActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemVersao);

        jMenuItemCategoria.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemCategoria.setMnemonic('t');
        jMenuItemCategoria.setText("Categoria");
        jMenuItemCategoria.setName("Cadastrar Categoria"); // NOI18N
        jMenuItemCategoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemCategoriaActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemCategoria);

        jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem5.setText("Tela");
        jMenuItem5.setName("Cadastrar Tela"); // NOI18N
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItem5);

        jMenuItemAssociarCategoriaVersao.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemAssociarCategoriaVersao.setMnemonic('i');
        jMenuItemAssociarCategoriaVersao.setText("Associar Categoria à Versão");
        jMenuItemAssociarCategoriaVersao.setName("Associar Categoria Versao"); // NOI18N
        jMenuItemAssociarCategoriaVersao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAssociarCategoriaVersaoActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemAssociarCategoriaVersao);

        jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_K, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem4.setText("Associar Video à Categoria e Versão");
        jMenuItem4.setName("Associar Video Categoria Versao"); // NOI18N
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItem4);

        jMenuItemTabela.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemTabela.setMnemonic('T');
        jMenuItemTabela.setText("Tabela");
        jMenuItemTabela.setName("Cadastrar Tabela"); // NOI18N
        jMenuItemTabela.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemTabelaActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemTabela);

        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem2.setText("Associar Tabela a Versão");
        jMenuItem2.setName("Associar Tabela Versao"); // NOI18N
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItem2);

        jMenuItemColuna.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemColuna.setMnemonic('l');
        jMenuItemColuna.setText("Coluna");
        jMenuItemColuna.setName("Cadastrar Coluna"); // NOI18N
        jMenuItemColuna.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemColunaActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemColuna);

        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem3.setMnemonic('l');
        jMenuItem3.setText("Associar Coluna a Versão");
        jMenuItem3.setName("Associar Coluna Versao"); // NOI18N
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItem3);

        jMenuItemCadastrarObjetos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemCadastrarObjetos.setMnemonic('O');
        jMenuItemCadastrarObjetos.setText("Objeto");
        jMenuItemCadastrarObjetos.setName("Cadastrar Objeto"); // NOI18N
        jMenuItemCadastrarObjetos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemCadastrarObjetosActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemCadastrarObjetos);

        jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem6.setText("Associar Objeto a Versão");
        jMenuItem6.setName("Associar Objeto a Versao"); // NOI18N
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItem6);

        jMenuItemDocumento.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemDocumento.setMnemonic('D');
        jMenuItemDocumento.setText("Documento");
        jMenuItemDocumento.setName("Cadastrar Documento"); // NOI18N
        jMenuItemDocumento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemDocumentoActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemDocumento);

        jMenuItemAssociarDocTabCol.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemAssociarDocTabCol.setMnemonic('s');
        jMenuItemAssociarDocTabCol.setText("Associar Documento Tabela Coluna");
        jMenuItemAssociarDocTabCol.setName("Associar Documento Tabela Coluna"); // NOI18N
        jMenuItemAssociarDocTabCol.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAssociarDocTabColActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemAssociarDocTabCol);

        jMenuItemDocDoc.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemDocDoc.setMnemonic('r');
        jMenuItemDocDoc.setText("Associar Documento a Documento");
        jMenuItemDocDoc.setName("Associar Documento a Documento"); // NOI18N
        jMenuItemDocDoc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemDocDocActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItemDocDoc);

        jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem7.setText("Associar Documento a Objeto");
        jMenuItem7.setName("Associar Documento a Objeto"); // NOI18N
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        jMenuCadastros.add(jMenuItem7);

        menuBarTopo.add(jMenuCadastros);

        jMenuConsultas.setMnemonic('o');
        jMenuConsultas.setText("Consultas");
        jMenuConsultas.setName("Versao dos Clientes"); // NOI18N

        jMenuItemDocumentos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemDocumentos.setText("Documentos");
        jMenuItemDocumentos.setName("Consultar Documentos"); // NOI18N
        jMenuItemDocumentos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemDocumentosActionPerformed(evt);
            }
        });
        jMenuConsultas.add(jMenuItemDocumentos);

        jMenuItem12.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem12.setText("Versão dos Clientes");
        jMenuItem12.setName("Consultar Versao Cliente"); // NOI18N
        jMenuItem12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem12ActionPerformed(evt);
            }
        });
        jMenuConsultas.add(jMenuItem12);

        menuBarTopo.add(jMenuConsultas);

        jMenuConfiguracao.setMnemonic('n');
        jMenuConfiguracao.setText("Configurações");

        jMenuItemBancoDados.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemBancoDados.setText("Banco de Dados");
        jMenuItemBancoDados.setName("Configurar Banco Dados"); // NOI18N
        jMenuItemBancoDados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemBancoDadosActionPerformed(evt);
            }
        });
        jMenuConfiguracao.add(jMenuItemBancoDados);

        menuBarTopo.add(jMenuConfiguracao);

        jMenu1.setText("Administração");

        jMenuItemSetor.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemSetor.setMnemonic('S');
        jMenuItemSetor.setText("Setor");
        jMenuItemSetor.setName("Cadastrar Setor"); // NOI18N
        jMenuItemSetor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemSetorActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemSetor);

        jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem8.setText("Revenda");
        jMenuItem8.setName("Cadastrar Revenda"); // NOI18N
        jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem8ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem8);

        jMenuItemColaborador.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemColaborador.setMnemonic('C');
        jMenuItemColaborador.setText("Colaborador");
        jMenuItemColaborador.setName("Cadastrar Colaborador"); // NOI18N
        jMenuItemColaborador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemColaboradorActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemColaborador);

        jMenuItemAcessoColaborador.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemAcessoColaborador.setMnemonic('A');
        jMenuItemAcessoColaborador.setText("Acesso do Colaborador");
        jMenuItemAcessoColaborador.setName("Acesso Colaborador"); // NOI18N
        jMenuItemAcessoColaborador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAcessoColaboradorActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemAcessoColaborador);

        jMenuItemJanela.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemJanela.setMnemonic('J');
        jMenuItemJanela.setText("Janelas");
        jMenuItemJanela.setName("Cadastrar Janela"); // NOI18N
        jMenuItemJanela.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemJanelaActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemJanela);

        menuBarTopo.add(jMenu1);

        jMenu2.setText("Atualização");

        jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_K, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem9.setText("Cliente");
        jMenuItem9.setName("Cadastrar Cliente"); // NOI18N
        jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem9ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem9);

        jMenuItem10.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem10.setText("Cronograma Atualização");
        jMenuItem10.setName("Cronograma Atualizacao"); // NOI18N
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem10);

        jMenuItem11.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem11.setText("Finalizar Atualização");
        jMenuItem11.setName("Finalizar Atualizacao"); // NOI18N
        jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem11ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem11);

        menuBarTopo.add(jMenu2);

        jMenuAjuda.setMnemonic('j');
        jMenuAjuda.setText("Ajuda");

        jMenuItemAbout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.ALT_MASK));
        jMenuItemAbout.setText("About");
        jMenuItemAbout.setName("Ajuda About"); // NOI18N
        jMenuItemAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAboutActionPerformed(evt);
            }
        });
        jMenuAjuda.add(jMenuItemAbout);

        menuBarTopo.add(jMenuAjuda);

        setJMenuBar(menuBarTopo);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelCentral, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelCentral, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItemProdutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemProdutoActionPerformed
        ProdutoView.main();
    }//GEN-LAST:event_jMenuItemProdutoActionPerformed

    private void jMenuItemColaboradorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemColaboradorActionPerformed
        ColaboradorView.main();
    }//GEN-LAST:event_jMenuItemColaboradorActionPerformed

    private void jMenuArquivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuArquivoActionPerformed

    }//GEN-LAST:event_jMenuArquivoActionPerformed

    private void jMenuItemSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSairActionPerformed
        if (javax.swing.JOptionPane.showConfirmDialog(null, "Deseja encerrar a aplicação?", "ATENÇÂO ", javax.swing.JOptionPane.YES_NO_OPTION) == 0) {
            this.dispose();
        }
    }//GEN-LAST:event_jMenuItemSairActionPerformed

    private void jMenuItemVersaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemVersaoActionPerformed
        VersaoView.main();
    }//GEN-LAST:event_jMenuItemVersaoActionPerformed

    private void jMenuItemCategoriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCategoriaActionPerformed
        CategoriaArvoreView.main();
    }//GEN-LAST:event_jMenuItemCategoriaActionPerformed

    private void jMenuItemDocumentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDocumentoActionPerformed
        DocumentarView.main();
    }//GEN-LAST:event_jMenuItemDocumentoActionPerformed

    private void jMenuItemAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAboutActionPerformed
        About.main();
    }//GEN-LAST:event_jMenuItemAboutActionPerformed

    private void jMenuItemBancoDadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemBancoDadosActionPerformed
        ConfigBancoDeDadosView.main();
    }//GEN-LAST:event_jMenuItemBancoDadosActionPerformed

    private void jMenuItemSetorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSetorActionPerformed
        SetorView.main();
    }//GEN-LAST:event_jMenuItemSetorActionPerformed

    private void jMenuItemAssociarCategoriaVersaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAssociarCategoriaVersaoActionPerformed
        CategoriaVersaoView.main();
    }//GEN-LAST:event_jMenuItemAssociarCategoriaVersaoActionPerformed

    private void jMenuItemTabelaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemTabelaActionPerformed
        TabelaView.main();
    }//GEN-LAST:event_jMenuItemTabelaActionPerformed

    private void jMenuItemColunaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemColunaActionPerformed
        ColunaView.main();
    }//GEN-LAST:event_jMenuItemColunaActionPerformed

    private void jMenuItemAssociarDocTabColActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAssociarDocTabColActionPerformed
        DocumentoTabelaColunaView.main();
    }//GEN-LAST:event_jMenuItemAssociarDocTabColActionPerformed

    private void jMenuItemDocDocActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDocDocActionPerformed
        DocumentoDocumentoView.main();
    }//GEN-LAST:event_jMenuItemDocDocActionPerformed

    private void jMenuItemDocumentosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDocumentosActionPerformed
        ConsultarDocumentoView.main();
    }//GEN-LAST:event_jMenuItemDocumentosActionPerformed

    private void jMenuCadastrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuCadastrosActionPerformed
        AcessoColaboradorView.main();
    }//GEN-LAST:event_jMenuCadastrosActionPerformed

    private void jMenuItemAcessoColaboradorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAcessoColaboradorActionPerformed
        AcessoColaboradorView.main();
    }//GEN-LAST:event_jMenuItemAcessoColaboradorActionPerformed

    private void jMenuItemJanelaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemJanelaActionPerformed
        JanelaView.main();
    }//GEN-LAST:event_jMenuItemJanelaActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        getTrocaUsuario();
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        AssociarTabelaVersaoView.main();
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        AssociarColunaVersaoView.main();
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        VideoVersaoCategoriaView.main();
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        TelaView.main();
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItemCadastrarObjetosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCadastrarObjetosActionPerformed
        ObjetoView.main();
    }//GEN-LAST:event_jMenuItemCadastrarObjetosActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        AssociarObjetoVersaoView.main();
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
        AssociarDocumentoObjetoView.main();
    }//GEN-LAST:event_jMenuItem7ActionPerformed

    private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed
        RevendaView.main();
    }//GEN-LAST:event_jMenuItem8ActionPerformed

    private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem9ActionPerformed
        ClienteView.main();
    }//GEN-LAST:event_jMenuItem9ActionPerformed

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        CronogramaAtualizacaoView.main();
    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem11ActionPerformed
        CronogramaAtualizacaoAtualizarView.main();
    }//GEN-LAST:event_jMenuItem11ActionPerformed

    private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem12ActionPerformed
        ConsultarVersaoClienteView.main();
    }//GEN-LAST:event_jMenuItem12ActionPerformed

    /**
     */
    public static void main() {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(PrincipalView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PrincipalView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PrincipalView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PrincipalView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PrincipalView().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenuAjuda;
    private javax.swing.JMenu jMenuArquivo;
    private javax.swing.JMenu jMenuCadastros;
    private javax.swing.JMenu jMenuConfiguracao;
    private javax.swing.JMenu jMenuConsultas;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenuItem jMenuItem12;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JMenuItem jMenuItemAbout;
    private javax.swing.JMenuItem jMenuItemAcessoColaborador;
    private javax.swing.JMenuItem jMenuItemAssociarCategoriaVersao;
    private javax.swing.JMenuItem jMenuItemAssociarDocTabCol;
    private javax.swing.JMenuItem jMenuItemBancoDados;
    private javax.swing.JMenuItem jMenuItemCadastrarObjetos;
    private javax.swing.JMenuItem jMenuItemCategoria;
    private javax.swing.JMenuItem jMenuItemColaborador;
    private javax.swing.JMenuItem jMenuItemColuna;
    private javax.swing.JMenuItem jMenuItemDocDoc;
    private javax.swing.JMenuItem jMenuItemDocumento;
    private javax.swing.JMenuItem jMenuItemDocumentos;
    private javax.swing.JMenuItem jMenuItemJanela;
    private javax.swing.JMenuItem jMenuItemProduto;
    private javax.swing.JMenuItem jMenuItemSair;
    private javax.swing.JMenuItem jMenuItemSetor;
    private javax.swing.JMenuItem jMenuItemTabela;
    private javax.swing.JMenuItem jMenuItemVersao;
    private javax.swing.JMenuBar menuBarTopo;
    private javax.swing.JPanel panelCentral;
    // End of variables declaration//GEN-END:variables
}
